package com.tvunetworks.center.user.constant;
/**
 * @program: tvucc-aggregator
 * @description: UserApiConstant
 * @author Kevin_Li
 * @create: 2019-10-10 17:59
 **/
public interface UserConstant {
    /**
     * ROOT_BOOKMARK_ID
     */
    String ROOT_BOOKMARK_ID = "0";

    /**
     * UrlPath
     */
    interface UrlPath{

        String USERSERVICE_GET_USER_INFO = "/main/GetInfoJSON?session=";
        String USERSERVICE_LOGOUT = "/main/LogOut?session=";
        String USERSERVICE_LIST_SERVICE_ACCESSABLE = "/main/ListAccessableService?session=";
        String USERSERVICE_GET_USER_ROLE = "/main/GetRoleByEmail?session=";
        String USERSERVICE_GET_USER_ID = "/main/GetUserId";
        String USERSERVICE_CREATE_USER = "/main/CreateUserForOtherService";
        String USERSERVICE_ADD_AND_REMOVE_USER = "/AddAndRemoveUserService?";
        String USERSERVICE_LOGIN_JSON = "/LoginJSON";
        String GEOSERVICE_GET_LOCATION_BY_LOCATION = "/Out/GetAddressLocationByLatAndLngServlet";
        String GEOSERVICE_GET_LOCATION_BY_ADDRESS = "/Out/GetGeoLocationByAddressServlet";
        String GEOSERVICE_GET_LOCATION_BY_IP = "/Out/getLatLngAndAddressByMultiIpServlet";
        String TPDS_SET_GEO = "/tr/TransferJsonServlet";

        String INSTANCE_LISTALLIDS = "/instance-manage/api/instance/listAllIds";
        String INSTANCE_CREATE = "/instance-manage/api/instance/create";
        String INSTANCE_SHUTDOWN = "/instance-manage/api/instance/shutdown";

        String GRID_CC_NOTIFY_NUM = "/openapi/getGridNotificationNum";
        String GCS_ADD_PAIR = "/addPairForGM.action";
        String GCS_REMOVE_PAIR = "/removePairForGM.action";
        String GCS_GET_R_PAIR = "/getGridSourceByRidForGM.action";

    }

    /**
     * RedisKey
     */
    interface RedisKey {
        String CACHE_USER_DEVICE = "cc:cacahe:u:d:";
        String CACHE_DEVICE_USER_WITH_TOKEN = "cc:cacahe:d:u:withToken:";

        String CACHE_API_SESSION = "cc:c:api:sess:";
    }

    /**
     * Feature
     */
    interface Feature {
        String ADMIN_AUTO_OWN_KEY = "adminAutoOwn";
        String NOT_ADMIN_AUTO_OWN_KEY = "other";
    }

    /**
     * FeatureRecord
     */
    interface FeatureRecord {
        long NO_START_TIME = 0;
        long NO_END_TIME = -1;
    }

    /**
     * MultView
     */
    interface MultView{
        String MULTVIEW_ADD_RECEIVER="addReceiver";
        String MULTVIEW_REMOVE_RECEIVER="removeReceiver";
        String MULTVIEW_REMOVE_CLOUD="removeCloud";
        String MULTVIEW_ADD_CLOUD="addCloud";
        String MULTVIEW_SPLIT_SCREEN="splitScreen";
        String MULTVIEW_SHOW_INFO="showInfo";
    }

    /**
     * GridEvent
     */
    interface GridEvent {

        interface Status {
            int NOT_START = 1;
            int START = 2;
            int END = 3;
            int CANCEL = 4;
        }

        // 1:初始状态
        // 2:任务开始时已经有绑定关系，不需要处理
        // 3:由任务开始产生的绑定，任务结束的时候需要移除绑定关系
        // 4:任务结束，由2状态，解除绑定关系，变成3状态
        // 5:由任务产生的绑定，任务结束移除绑定关系时，设备已经提前被移除
        interface BindStatus {
            int INIT = 1;
            int ALREADY_BINDED = 2;
            int EVENT_START_ADD_BIND = 3;
            int EVENT_END_REMOVE_BIND = 4;
            int EVENT_END_NOT_BINDED = 5;
        }

        // 1:create  2:pair  3:cancel  4:delete  5:

        /**
         * RecordStatus
         */
        interface RecordStatus {
            int CREATE = 1;
            int START = 1;
            int PAIR = 2;
            int END = 2;
            int CANCEL = 3;
            int DELETE = 4;
        }

    }
    //booking

    /**
     * PlayOut
     */
    interface PlayOut {
        String VIDEO = "Video";
        String FILE = "File";
    }

    /**
     * DeviceStatus
     */
    interface DeviceStatus {
        String ONLINE = "1";
        String LIVE = "2";
        String OFFLINE = "0";
    }
}
